using System.Collections.Generic;
using System.Text.Json.Serialization;
using JlPay.Sdk.Models;
using JlPay.Sdk.Services;

namespace JlPay.Sdk.Models.Openmerch.Change
{
    /// <summary>
    /// 签约信息修改请求
    /// </summary>
    public class SignInfoModifyRequest : OrgBaseRequest, IRequestMapper
    {
        /// <summary>
        /// API URL
        /// </summary>
        public const string API_URL = "/open/merch/access/sign-info/modify";

        /// <summary>
        /// 申请单号
        /// </summary>
        [JsonPropertyName("apply_id")]
        public string ApplyId { get; set; } = string.Empty;

        /// <summary>
        /// 签约方式
        /// </summary>
        [JsonPropertyName("sign_mode")]
        public string SignMode { get; set; } = string.Empty;

        /// <summary>
        /// 纸质协议照片
        /// </summary>
        [JsonPropertyName("agreement_pic")]
        public string AgreementPic { get; set; } = string.Empty;

        /// <summary>
        /// 法人签约手机号码
        /// </summary>
        [JsonPropertyName("legal_person_phone")]
        public string LegalPersonPhone { get; set; } = string.Empty;

        /// <summary>
        /// 授权收款人签约手机号码
        /// </summary>
        [JsonPropertyName("delegatee_phone")]
        public string DelegateePhone { get; set; } = string.Empty;

        /// <summary>
        /// 构造函数
        /// </summary>
        public SignInfoModifyRequest()
        {
        }

        /// <summary>
        /// 转换为字典
        /// </summary>
        /// <returns>字典对象</returns>
        public Dictionary<string, object> ToMap()
        {
            var map = new Dictionary<string, object>();

            // 添加基础字段
            if (!string.IsNullOrEmpty(OrgNo))
                map["org_no"] = OrgNo;
            if (!string.IsNullOrEmpty(MerchNo))
                map["merch_no"] = MerchNo;
            if (!string.IsNullOrEmpty(ApplyId))
                map["apply_id"] = ApplyId;
            if (!string.IsNullOrEmpty(SignMode))
                map["sign_mode"] = SignMode;
            if (!string.IsNullOrEmpty(AgreementPic))
                map["agreement_pic"] = AgreementPic;
            if (!string.IsNullOrEmpty(LegalPersonPhone))
                map["legal_person_phone"] = LegalPersonPhone;
            if (!string.IsNullOrEmpty(DelegateePhone))
                map["delegatee_phone"] = DelegateePhone;

            return map;
        }
    }
} 